{% include "../public/min-header.html" %}
<style type="text/css">
    body{overflow-y: hidden;}
</style>
<div class="wrapper">
    {% include "../public/breadcrumb.html" %}
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <nav class="navbar navbar-default">
                            <div class="navbar-form form-group pull-right">
                                <a href="{{helper.pathFor('adalad',{act:'add'})}}" class="btn btn-primary pull-right"><i class="fa fa-plus"></i>添加</a>
                            </div>
                        </nav>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <div class="row">
                            <div class="col-sm-12">
                                <table id="list-table" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
                                    <thead>
                                    <tr role="row">
                                        <th>ID</th>
                                        <th>标题</th>
                                        <th>类型</th>
                                        <th>简介</th>
                                        <th>创建时间</th>
                                        <th>更新时间</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {% for vo in lists %}
                                    <tr role="row" align="center">
                                        <td>{{vo.id}}</td>
                                        <td>{{vo.title}}</td>
                                        <td>{{typeList[vo.type_id]}}</td>
                                        <td>{{vo.desc|striptags|truncate(50)}}</td>
                                        <td>{{helper.time_to_date(vo.create_time)}}</td>
                                        <td>{{helper.time_to_date(vo.update_time)}}</td>
                                        <td>{{'正常' if info.status == 1 else '关闭'}}</td>
                                        <td>
                                            <a class="btn btn-primary" href="{{helper.pathFor('adalad',{id:vo.id,act:'edit'})}}"><i class="fa fa-pencil"></i></a>
                                            <a class="btn btn-danger setRemove" href="javascript:void(0)" data-post-url="{{helper.pathFor('adalad')}}" data-id="{{vo.id}}" data-jump-url="{{helper.pathFor('adalin')}}"  data-csrf="{{ ctx.csrf | safe }}"><i class="fa fa-trash-o"></i></a>
                                        </td>
                                    </tr>
                                    {% endfor %}
                                    </tbody>
                                    <tfoot>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                        {% include "../public/page.html" %}
                    </div><!-- /.box-body -->
                </div><!-- /.box -->
            </div>
        </div>
    </section>
</div>
{% include "../public/main-footer.html" %}